﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XiaoYou.Game.Script.SnqxExilium.Player
{
    public class XiaoYouLewanHelper
    {
        private lw.lwsoft lw;

        private static LewanResult lewanResult = new LewanResult();

        public XiaoYouLewanHelper(lw.lwsoft _lw)
        {
            lw = _lw;
        }

        public LewanResult GT(Func<int> func)
        {
            int ret = func();
            lewanResult.Ret = ret;
            if (ret == 1)
            {
                lewanResult.X = lw.GetX();
                lewanResult.Y = lw.GetX();
            }
            return lewanResult;
        }
    }


    public class LewanResult
    {
        public int Ret { get; set; }

        public int X { get; set; }

        public int Y { get; set; }

        public bool Success
        {
            get { return Ret >0; }
        }

        public bool Error
        {
            get { return Ret == 0; }
        }

    }
}
